home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / pdcurs21.zip / PRIVATE.ZIP / _SCRCLOS.C < prev    next >
Text File  |  1992-11-21  |  2KB  |  53 lines

  1. #define        CURSES_LIBRARY  1
  2. #include <curses.h>
  3.  
  4. #ifndef        NDEBUG
  5. char *rcsid__scrclos = "$Header: c:/curses/private/RCS/_scrclos.c%v 2.0 1992/11/15 03:24:33 MH Rel $";
  6. #endif
  7.  
  8.  
  9.  
  10.  
  11. /*man-start*********************************************************************
  12.  
  13.   PDC_scr_close()      - Internal low-level binding to close the physical screen
  14.  
  15.   PDCurses Description:
  16.        This function provides a low-level binding for the Flexos
  17.        platform which must close the screen before writing to it.
  18.        This is a nop for the DOS platform.
  19.  
  20.        This function is provided in order to reset the FlexOS 16 bit
  21.        character set for input rather than the limited input
  22.        character set associated with the VT52.
  23.  
  24.   PDCurses Return Value:
  25.        This function returns OK on success, otherwise an ERR is returned.
  26.  
  27.   PDCurses Errors:
  28.        The DOS platform will never fail.  The Flexos platform may fail
  29.        depending on the ability to close the current virtual console in
  30.        8 (as opposed to 16) bit mode.
  31.  
  32.   Portability:
  33.        PDCurses        int     PDC_scr_close( void );
  34.  
  35. **man-end**********************************************************************/
  36.  
  37. int    PDC_scr_close(void)
  38. {
  39. #ifdef FLEXOS
  40.        _flexos_8bitmode();
  41.        vir.vc_kbmode = kbmode;
  42.        vir.vc_smode = smode;
  43.        vir.vc_mode = cmode;
  44.        retcode = s_set(T_VIRCON, 1L, (char *) &vir, (long) sizeof(vir));
  45.        if  (retcode < 0L)
  46.                return( ERR );
  47.        return( OK );
  48. #endif
  49. #if    defined (DOS) || defined (OS2)
  50.        return( OK );
  51. #endif
  52. }
  53.